package gui.newQuiz;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class NewQuizButtonListener implements ActionListener {
	NewQuiz main;
	
	public NewQuizButtonListener(NewQuiz main) {
		this.main = main;
	}
	@Override
	public void actionPerformed(ActionEvent e) {
		if(e.getSource().equals(main.addQuestion)) {
			addQuestions();
		}
		else if(e.getSource().equals(main.ok)) {
			okButtonPressed();
		}
	}
	
	private void okButtonPressed() {
		//TODO Save quiz, return to title screen.
	}
	private void addQuestions() {
		new QuestionWindow(main.quiz).setVisible(true);
	}
}